<template>
    <div class="rootBox">
        <Panel class="card level" :title="'尾矿库等级'">
            <div class="content">
                <div class="level-item" v-for="(item, index) in levelData" :key="index">
                    <div class="value">{{ item.value }}</div>
                    <div class="label">{{ item.label }}</div>
                </div>
            </div>
        </Panel>
        <Panel class="card running" :title="'运行情况'">
            <div class="running-item" v-for="(item, index) in runningData" :key="index">
                <div
                    class="icon"
                    :style="{
                        backgroundImage: `url('${item.url}')`,
                        backgroundSize: 'cover',
                    }"
                ></div>
                <div class="label">{{ item.label }}:</div>
                <div class="value">{{ item.value }}座</div>
            </div>
        </Panel>
        <Panel class="card scale" :title="'尾矿风险比例'">
            <EchartsPie />
        </Panel>
    </div>
</template>

<script>
import Panel from "../../../../component/Panel";
import EchartsPie from "./conponent/EchartsPie";

export default {
    components: {
        Panel,
        EchartsPie,
    },
    data() {
        return {
            levelData: [
                {
                    label: "一等",
                    value: 20,
                },
                {
                    label: "二等",
                    value: 34,
                },
                {
                    label: "三等",
                    value: 28,
                },
                {
                    label: "四/五等",
                    value: 15,
                },
            ],
            runningData: [
                {
                    label: "在用",
                    value: 66,
                    url: require("../../../../asset/image/group/idot-blue.png"),
                },

                {
                    label: "停用",
                    value: 2,
                    url: require("../../../../asset/image/group/idot-yellow.png"),
                },
            ],
        };
    },
};
</script>

<style lang="scss" scoped>
.rootBox {
    height: 100%;
    width: 100%;
    .card {
        width: 100%;
        // height: 100%;
        // border: 1px solid red;
    }
    .level {
        margin-top: 64px;
        height: 230px;
        width: 100%;

        .content {
            height: 170px;
            width: 100%;
            display: flex;
            justify-content: space-around;
            flex-wrap: wrap;
            font-size: 16px;
            .level-item {
                width: 20%;
                height: 50%;
                margin-top: 10px;
                margin-left: 57px;
                .value {
                    width: 48px;
                    height: 48px;
                    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
                    border: 1px solid #024786;

                    font-size: 36px;
                    font-family: DINCondensed-Bold, DINCondensed;
                    font-weight: bold;
                    color: #00baff;
                    line-height: 48px;
                    text-align: center;
                    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5), 0px 0px 5px #0072dd;
                }
                .label {
                    margin-top: 5px;
                    width: 55px;
                    text-align: center;
                    color: #ffffff;
                }
            }
        }
    }
    .running {
        height: 172px;
        .running-item {
            width: 210px;
            height: 35px;
            margin-top: 22px;
            margin-left: 58px;
            // border: 1px solid red;
            .icon {
                width: 22px;
                height: 22px;
                float: left;
                margin-right: 13px;
                margin-top: 8px;
            }
            .label {
                float: left;
                margin-top: 11px;
                font-size: 16px;
                font-family: SourceHanSansCN-Medium, SourceHanSansCN;
                font-weight: 500;
                color: #ffffff;
                line-height: 16px;
            }
            .value {
                float: right;

                font-size: 35px;
                font-family: DINCondensed-Bold, DINCondensed;
                font-weight: bold;
                color: #ffffff;
                line-height: 35px;
            }
        }
    }
    .scale {
        height: calc(100% - 240px - 172px - 50px);
    }
}
</style>
